<?php

namespace DP\Decorator\Lib;

use DP\Decorator\Core\Beverage;

class Sugar extends CondimentDecorator
{
    private $beverage;

    public function __construct(Beverage $beverage)
    {
        parent::__construct();

        $this->beverage = $beverage;
        $this->name = 'sugar';
    }

    public function cost()
    {
        return $this->beverage->cost() + 0.1;
    }
}
